<?php

namespace App\Models;

use Encore\Admin\Traits\DefaultDatetimeFormat;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class StockReport extends Model
{
    use SoftDeletes;
    use DefaultDatetimeFormat;
    protected $table = 'stock_report';

    public function products(){
        return $this->belongsToMany(StockProduct::class, 'stock_report_product', 'report_id', 'product_id')
            ->withPivot(['product_count','product_desc']);
    }


}
